var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    count_t:'0',
    count_m:'0',
    dqr:0, 
    dsk:0,
    dfh:0,
    dsh:0,
    ysh:0,
    dfk:0,
    menuitems: [{
      url: '../allOrder/allOrder',
      img: '../../images/sc1.png',
      text: '全部订单'
    }, {
        url: '../invalidOrder/invalidOrder',
      img: '../../images/gouwuche.png',
      text: '无效订单'
    }, {
      url: '../reward/reward',
      img: '../../images/problem.png',
      text: '我的奖励'
    }]
  },
  onShow:function(){
    var that = this
    wx.getStorage({
      key: 'openid',
      success: function (res) {
        let openid = res.data
        wx.request({
          url: app.globalData.URL + '/app/team/index?openid=' + openid,
          success: function (res) {
            console.log(res)
            that.setData({
              count_t: res.data.zongyeji,
              count_m: res.data.yueyeji,
              dqr: res.data.orderCount.dqr,
              dsk: res.data.orderCount.dsk,
              dfh: res.data.orderCount.dfh,
              dsh: res.data.orderCount.dsh,
              ysh: res.data.orderCount.ysh,
              dfk: res.data.orderCount.dfk
            })
          }
        })
      },
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

    
  },

  
})